package com.module02.demo03;


//上网套餐类
public class SubSurfMenu extends Menu implements SurfService {

    //特征
    private int data;//上网流量

    public SubSurfMenu() {
    }

    public SubSurfMenu(int monthlyCost, int data) {
        super(monthlyCost);
        this.data = data;

    }


    public int getData() {
        return data;
    }

    public void setData(int data) {
        this.data = data;
    }

    //行为   显示所有套餐信息
    @Override
    public void show() {
        System.out.println("本卡套餐内上网流量：" + getData() + "GB,每月资费：" + getMonthlyCost() + "元 。");
    }

    @Override
    public void surfService(int data, PhoneCardType pct) {
        System.out.println("恭喜开通上网服务,本卡类型为:" + pct.getCARD_TYPE() + ",套餐内每月上网流量有:" + data + "GB！");

    }


}
